From 7575d5216f9bdc6519719852593629eb7ab21941 Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Tue, 21 May 2019 20:26:49 +0100 Subject: [PATCH] ScrolledWindow: Annotate h|vadjustment as nullable The code interprets NULL to mean 'create a new Adjustment and use that, deposing the old one', but we neither documented nor annotated that ability, so users could be unsure how to "unlink" a specific Adjustment. While users could pass their own Adjustment in if this wasn't nullable, we already support NULL in the code, and it doesn't hurt to document that this is available as a convenience while retaining the behaviour. --- gtk/gtkscrolledwindow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 1a1c03b4ae..1a87169b71 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -2032,7 +2032,7 @@ gtk_scrolled_window_new (GtkAdjustment *hadjustment, /** * gtk_scrolled_window_set_hadjustment: * @scrolled_window: a #GtkScrolledWindow - * @hadjustment: horizontal scroll adjustment + * @hadjustment: (nullable): the #GtkAdjustment to use, or %NULL to create a new one * * Sets the #GtkAdjustment for the horizontal scrollbar. */ @@ -2106,7 +2106,7 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window, /** * gtk_scrolled_window_set_vadjustment: * @scrolled_window: a #GtkScrolledWindow - * @vadjustment: vertical scroll adjustment + * @vadjustment: (nullable): the #GtkAdjustment to use, or %NULL to create a new one * * Sets the #GtkAdjustment for the vertical scrollbar. */ -- 2.30.2